{% extends 'index.html' %}
{% load staticfiles %}
{% block title %}{{ project }}{% endblock %}
{% block context %}

    <div class="container">
        <div class="row text-center">
            <h1>{{ project }}</h1>
        </div>
        <div class="table-responsive table-hover">
            <table class="table">
                <caption>已收到: {{ num }}</caption>
                <thead>
                <tr>
                    <th>用户名</th>
                    <th>id</th>
                    <th>上传日期</th>
                    <th>文件名</th>
                    <th>文件大小</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    {% for file in files %}
                        <tr>
                            <td>{{ file.username }}</td>
                            <td>{{ file.word2 }}</td>
                            <td>{{ file.uploadtime }}</td>
                            <td>{{ file.filename }}</td>
                            <td>{{ file.filesize }} byte</td>
                        </tr>
                    {% empty %}
                        <td>暂时无人上传!</td>
                    {% endfor %}
                </tr>
                </tbody>
            </table>
        </div>

        <div class="row">
            <div class="col-xs-6">
                {% if num > 0 %}
                    <a href="{% url 'downlaodfile' %}?ppid={{ project.ppid }}&projectname={{ project }}" class="btn btn-primary">打包下载</a>
                {% endif %}
            </div>
        </div>

    </div>

{% endblock %}